Skip to main content

JsConfig<T>

Assembly: ServiceStack.Text.dll
View Source
Declaration
public class JsConfig<T>

Properties

TextCase

Text case to use for property names (Default = PascalCase)

View Source
Declaration
public static TextCase TextCase { get; set; }

EmitCamelCaseNames

Emitting camelCase for property names

View Source
Declaration
[Obsolete("Use TextCase = TextCase.CamelCase")]
public static bool? EmitCamelCaseNames { get; set; }

EmitLowercaseUnderscoreNames

Emitting lowercase_underscore_casing for property names

View Source
Declaration
[Obsolete("Use TextCase = TextCase.SnakeCase")]
public static bool? EmitLowercaseUnderscoreNames { get; set; }

IncludeDefaultValue

View Source
Declaration
public static bool IncludeDefaultValue { get; set; }

SerializeFn

View Source
Declaration
public static Func<T, string> SerializeFn { get; set; }

TreatValueAsRefType

Opt-in flag to set some Value Types to be treated as a Ref Type

View Source
Declaration
public static bool TreatValueAsRefType { get; set; }

HasSerializeFn

Whether there is a fn (raw or otherwise)

View Source
Declaration
public static bool HasSerializeFn { get; }

RawSerializeFn

View Source
Declaration
public static Func<T, string> RawSerializeFn { get; set; }

OnSerializingFn

View Source
Declaration
public static Func<T, T> OnSerializingFn { get; set; }

OnSerializedFn

View Source
Declaration
public static Action<T> OnSerializedFn { get; set; }

DeSerializeFn

View Source
Declaration
public static Func<string, T> DeSerializeFn { get; set; }

RawDeserializeFn

View Source
Declaration
public static Func<string, T> RawDeserializeFn { get; set; }

HasDeserializeFn

View Source
Declaration
public static bool HasDeserializeFn { get; }

OnDeserializedFn

View Source
Declaration
public static Func<T, T> OnDeserializedFn { get; set; }

HasDeserializingFn

View Source
Declaration
public static bool HasDeserializingFn { get; }

OnDeserializingFn

View Source
Declaration
public static Func<T, string, object, object> OnDeserializingFn { get; set; }

Fields

IncludeTypeInfo

Always emit type info for this type. Takes precedence over ExcludeTypeInfo

View Source
Declaration
public static bool? IncludeTypeInfo

ExcludeTypeInfo

Never emit type info for this type

View Source
Declaration
public static bool? ExcludeTypeInfo

ExcludePropertyNames

Exclude specific properties of this type from being serialized

View Source
Declaration
public static string[] ExcludePropertyNames

Methods

WriteFn<TSerializer>(TextWriter, Object)

View Source
Declaration
public static void WriteFn<TSerializer>(TextWriter writer, object obj)
Parameters
TypeName
System.IO.TextWriterwriter
System.Objectobj
Type Parameters
  • TSerializer

ParseFn(String)

View Source
Declaration
public static object ParseFn(string str)
Returns

System.Object

Parameters
TypeName
System.Stringstr

Reset()

View Source
Declaration
public static void Reset()

RefreshRead()

View Source
Declaration
public static void RefreshRead()

RefreshWrite()

View Source
Declaration
public static void RefreshWrite()